
import { Entity, CreateDate, PrimaryUuid, UpdateDate, SysAttachmentBucket, SysAttachmentFrom, Hash, Title, SysAttachmentType, Tags, Link, Code, Uuid } from '@sker/core'
@Entity({
    name: 'sys_attachment'
})
export class SysAttachment {
    static title: string = `系统附件`;
    static resource: string = `sys_attachment`;

    @PrimaryUuid({ comment: '编号', primaryKeyConstraintName: "PK_SYS_ATTACHMENT_ID" })
    id!: string;

    @Hash({ comment: 'hash' })
    hash!: string;

    @Uuid({ nullable: true })
    category_id: string;

    @SysAttachmentBucket({ type: 'varchar', length: 50, comment: '存放位置' })
    bucket!: string;

    @SysAttachmentType({ comment: '类型' })
    type!: string;

    @SysAttachmentFrom({ comment: '来源' })
    from!: string;

    @Title({ comment: '文件名' })
    name!: string;

    @Tags({ comment: '标签' })
    tags!: string[]

    @Link({ nullable: true })
    url: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}
